package com.xiyu.service.enums.common;

import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
import com.xiyu.service.enums.common.IntArrayValuable;

/**
* 婚姻状况
*/
@Getter
@AllArgsConstructor
public enum MaritalStatusEnum implements IntArrayValuable {

    /**
    * 未婚
    */
    UNMARRIED(0, "未婚"),
    /**
    * 已婚
    */
    MARRIED(1, "已婚"),
    /**
    * 离异
    */
    DIVORCE(2, "离异"),
    /**
    * 丧偶
    */
    WIDOWED(3, "丧偶");

    private final Integer value;

    private final String label;

    public static final int[] VALUES = Arrays.stream(values()).mapToInt(MaritalStatusEnum::getValue).toArray();

    @Override
    public int[] getValues() { return VALUES;}

    public static final String[] LABELS = Arrays.stream(values()).map(MaritalStatusEnum::getLabel).toArray(String[]::new);

    @Override
    public String[] getLabels() { return LABELS; }

}
